package resource

import "fmt"

type IPeople interface {
	Say()
	GetMoney() int
	GetName() string
	GetTypeText() string
	SetName(string) bool
}

type People struct {
	Name  string
	Money int
	Age   uint
}

func (People) GetTypeText() string {
	return "People"
}
func (p People) GetName() string {
	return p.Name
}
func (p People) SetName(name string) bool {
	p.Name = name
	return true
}
func (p People) GetMoney() int {
	return p.Money
}

// Male 男性（继承上面的People)
type Male struct {
	People
	JJ int
}

func (Male) Say() {
	fmt.Println("Ah...o")
}

func (Male) GetTypeText() string {
	return "strong men"
}

func (m *Male) Work() bool {
	m.Money += 100
	return true
}

type Female struct {
	People
	BB int
}

func (Female) Say() {
	fmt.Println("Hi...i")
}

func (Female) GetTypeText() string {
	return "beautifully women"
}
